<template>
    <van-pull-refresh v-model="isLoading" success-text="刷新成功" @refresh="onRefresh">
        <ul>
            <li v-for="item in list" :key="item.id">
                <div><img :src="item.image" alt=""></div>
                <p>{{ item.title }}</p>
                <p>￥{{ item.price}}</p>
            </li>
        </ul>
    </van-pull-refresh>
</template>
<script setup>
import request from '@/utlis/request.js';
import { onMounted,ref} from 'vue';
const list=ref([]);
onMounted(()=>{
    request.get('/list',{
        pagination:1, pageNum:30
    }).then(res=>{
        if(res.data.code==200){
            console.log(res.data.data);
            list.value=res.data.data;
        }
    })
})
</script>